package com.sprucetec.live.enums;

/**
 * @ClassName LiveIntranetEnum
 * @Description: 是否内网地址枚举
 * @Author Kenny
 * @Date 2020/4/26
 **/
public enum LiveIntranetEnum {

    YES(0, "是"),
    NO(1, "否");

    private Integer code;

    private String desc;

    LiveIntranetEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String code2Desc(Integer code) {
        for (VideoTypeEnum status : VideoTypeEnum.values()) {
            if (status.getCode().equals(code)) {
                return status.getDesc();
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
